home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: Using QuickDrawGX in ODF
- Sent: 9/5/96 7:46 AM
- Received: 9/5/96 7:46 AM
- From: "Scott Daniels" <scottdfl@sprynet.com>
- Reply-To: ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List
-
-
- Brad,
-
- I understand how picture contexts work. What I want to know is how to write
- a picture context using quickdraw GX (a bitmap shape context as well). If
- you look at the graphics context classes in ODF, (you obviously know) that
- the various contexts descend from a base class, with one context for each
- type of "context". If one wants to use GX however, there is only one
- context provided which appears to be a "view" context. How do I write other
- contexts for pictures & bitmapshapes?
-
- Scott
-
- ----------
- > From: Brad Pettit <bpettit@apple.com>
- > To: OpenDoc Development Framework Discussion List
- <ODF-Interest@CILabs.ORG>
- > Subject: Re: Using QuickDrawGX in ODF
- > Date: Tuesday, September 03, 1996 3:06 PM
- >
- >
- > You're right about the rotated text in that there is no direct support
- > for rotated text in the framework. However, I'm not sure from your
- > question if you ware wondering how picture contexts work. Here is an
- > example.
- >
- >
- > // create a 100x100 picture
- > FW_CRect picBounds(FW_kFixed0, FW_kFixed0, FW_IntToFixed(100),
- > FW_IntToFixed(100));
- > FW_CPicture myPicture; // create an empty picture
- >
- > {
- > // create a picture context so that we can draw into the picture
- > FW_CPictureContext picContext(ev, myPicture, picBounds.Width(),
- > picBounds.Height());
- > picContext.SetClipRect(pictureBounds);
- >
- > MyDrawStuffHere(ev, pictureContext, pictureBounds);
- > }
- >
- >
- > myPicture now contains all the drawing done in MyDrawStuffHere.
- > We can draw the picture anywhere using:
- >
- > FW_CPictureShape::RenderPicture(viewContext, myPicture,
- > myDestinationRect);
- >
- >
- > --Brad